package com.tju.resource.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tju.resource.model.TbMaterial;
import com.tju.resource.model.TbRmMatl;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
* @Entity generator.domain.TbMaterial
*/
public interface TbMaterialMapper extends BaseMapper<TbMaterial> {

    IPage<TbMaterial> getAll(Page<TbMaterial> page, @Param("pa") Map<String, String> params);
    IPage<TbMaterial> byOrderNumber(Page<TbMaterial> page, @Param("pa") Map<String, String> params);
    TbMaterial byOrderMatlNumber( @Param("pa") Map<String, String> params);
    TbMaterial selectByMatilId(Long id);

    /**
     * 根据物料id查询原材料
     * @param matlId
     * @return
     */
    List<TbRmMatl> selectTbRmMatl(Long matlId);
}
